import React from 'react';
import { inject, observer } from 'mobx-react';
import {
  WeaRadioGroup,
} from 'ecCom';
import isEmpty from 'lodash/isEmpty';
import isEqual from 'lodash/isEqual';

@inject('docOfAuthorStore')

@observer
class DocOfAuthorContent extends React.Component {
  shouldComponentUpdate(nextProps) {
    return !isEqual(this.props.config, nextProps.config);
  }

  render() {
    return (
      <div className="count">
        <div className="count-condition">
          {
            !isEmpty(this.props.config) &&
             <WeaRadioGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaRadioGroup@diuq68`}
               {...this.props}
             />
          }
        </div>
      </div>
    );
  }
}
export default DocOfAuthorContent;

